load(
    "@prelude//toolchains/android/tools:build_rules.bzl",
    "buck_java_library",
    "buck_java_test",
)
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("android_devxx")

source_listing()

buck_java_library(
    name = "testutil",
    srcs = [
        "FakeJavac.java",
        "FakeStandardJavaFileManager.java",
    ],
    visibility = [
        "prelude//toolchains/android/test/...",
    ],
    deps = [
        "prelude//toolchains/android/src/com/facebook/buck/android:helpers",
        "prelude//toolchains/android/src/com/facebook/buck/cd/resources/proto:javacd-model",
        "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/core:core",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java:steps",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java:support",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/abi/source/api:api",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/classes:classes",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/javax:javax",
        "prelude//toolchains/android/src/com/facebook/buck/step:step",
        "prelude//toolchains/android/src/com/facebook/buck/test/result/type:type",
        "prelude//toolchains/android/src/com/facebook/buck/test/selectors:selectors",
        "prelude//toolchains/android/src/com/facebook/buck/util:process_executor",
        "prelude//toolchains/android/src/com/facebook/buck/util:util",
        "prelude//toolchains/android/src/com/facebook/buck/util/environment:environment",
        "prelude//toolchains/android/src/com/facebook/buck/util/environment:platform",
        "prelude//toolchains/android/src/com/facebook/buck/util/unit:unit",
        "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
        "prelude//toolchains/android/test/com/facebook/buck/testutil/integration:util",
        "prelude//toolchains/android/third-party:args4j",
        "prelude//toolchains/android/third-party:asm",
        "prelude//toolchains/android/third-party:dd-plist",
        "prelude//toolchains/android/third-party:ddmlib",
        "prelude//toolchains/android/third-party:guava",
        "prelude//toolchains/android/third-party:infer-annotations",
        "prelude//toolchains/android/third-party:jackson-annotations",
        "prelude//toolchains/android/third-party:jackson-core",
        "prelude//toolchains/android/third-party:jackson-databind",
        "prelude//toolchains/android/third-party:jsr305",
        "prelude//toolchains/android/third-party:junit",
        "prelude//toolchains/android/third-party:okhttp",
        "prelude//toolchains/android/third-party:okio",
        "prelude//toolchains/android/third-party:tools-sdk-common",
    ],
    exported_deps = [
    ],
)

buck_java_test(
    name = "java",
    srcs = glob(
        ["*Test.java"],
    ),
    _java_toolchain = "toolchains//:java_for_android",
    java_version = "21",
    labels = [
        "long_running",
    ],
    deps = [
        "prelude//toolchains/android/src/com/facebook/buck/android:helpers",
        "prelude//toolchains/android/src/com/facebook/buck/cd/resources/proto:javacd-model",
        "prelude//toolchains/android/src/com/facebook/buck/io/file:file",
        "prelude//toolchains/android/src/com/facebook/buck/io/pathformat:pathformat",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/core:core",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java:steps",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java:support",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/abi/source/api:api",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/classes:classes",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/javax:javax",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/runner:runner",
        "prelude//toolchains/android/src/com/facebook/buck/jvm/java/version/utils:utils",
        "prelude//toolchains/android/src/com/facebook/buck/step:step",
        "prelude//toolchains/android/src/com/facebook/buck/step/isolatedsteps:isolatedsteps",
        "prelude//toolchains/android/src/com/facebook/buck/step/isolatedsteps/java:java",
        "prelude//toolchains/android/src/com/facebook/buck/test/result/type:type",
        "prelude//toolchains/android/src/com/facebook/buck/test/selectors:selectors",
        "prelude//toolchains/android/src/com/facebook/buck/util:process_executor",
        "prelude//toolchains/android/src/com/facebook/buck/util:util",
        "prelude//toolchains/android/src/com/facebook/buck/util/environment:environment",
        "prelude//toolchains/android/src/com/facebook/buck/util/environment:platform",
        "prelude//toolchains/android/src/com/facebook/buck/util/function:function",
        "prelude//toolchains/android/src/com/facebook/buck/util/json:json",
        "prelude//toolchains/android/src/com/facebook/buck/util/unit:unit",
        "prelude//toolchains/android/src/com/facebook/buck/util/zip:zip",
        "prelude//toolchains/android/test/com/facebook/buck/android:testutil",
        "prelude//toolchains/android/test/com/facebook/buck/step:testutil",
        "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
        "prelude//toolchains/android/test/com/facebook/buck/testutil/integration:util",
        "prelude//toolchains/android/test/com/facebook/buck/util:testutil",
        "prelude//toolchains/android/third-party:args4j",
        "prelude//toolchains/android/third-party:asm",
        "prelude//toolchains/android/third-party:commons-compress",
        "prelude//toolchains/android/third-party:dd-plist",
        "prelude//toolchains/android/third-party:ddmlib",
        "prelude//toolchains/android/third-party:guava",
        "prelude//toolchains/android/third-party:infer-annotations",
        "prelude//toolchains/android/third-party:jackson-annotations",
        "prelude//toolchains/android/third-party:jackson-core",
        "prelude//toolchains/android/third-party:jackson-databind",
        "prelude//toolchains/android/third-party:jimfs",
        "prelude//toolchains/android/third-party:jsr305",
        "prelude//toolchains/android/third-party:junit",
        "prelude//toolchains/android/third-party:okhttp",
        "prelude//toolchains/android/third-party:okio",
        "prelude//toolchains/android/third-party:tools-sdk-common",
        "prelude//toolchains/android/third-party:zstd-jni",
        ":testutil",
    ],
)
